#ifndef MYANIMATION_H
#define MYANIMATION_H
#include "QByteArray"
#include "QPropertyAnimation"
#include "QPainterPath"
#include "QWidget"
#include "ui_mainwindow.h"
class MyAnimation:public QPropertyAnimation
{
public:
    MyAnimation(QObject *target, const QByteArray &propertyName, QWidget *parent);
    enum class PathType{
        LinearPath = 0,
        CirclePath = 1,
        ArcPathL = 2,
        ArcPathR = 3,
        NPathTypes = 100
    };
    void setPathType(PathType);
private:
    PathType m_pathType;
    QPainterPath m_path;
    QWidget* wi_parent;
protected:
    virtual void updateCurrentTime(int);
};

#endif // MYANIMATION_H
